/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gpstracking.Utils.Geometry;

import java.lang.reflect.Type;

import com.google.gson.InstanceCreator;

/**
 *
 * @author jmj
 */
public class Point {
    public double x, y;
    public Point( double x, double y) {
        this.x = x;
        this.y = y;
    }
    
    
    public double cross( Point b){
        return x * b.y - y * b.x;
    }
    public Point minus( Point b){
    	
        return new Point( x - b.x, y - b.y);
    }
    public double mult( Point b ){
        return x * b.x + y * b.y;
    }
    
    public boolean equals(Object A ){
        Point a = ( Point ) A;
        return Double.compare(a.x, x) == 0  && Double.compare(a.y, y) == 0;
    }
}


